import Taro from "@tarojs/taro";

/**
 * 获取系统信息
 */
export const systemInfo = Taro.getSystemInfoSync();

/**
 * 判断平台是否为iOS
 */
export const IS_IOS = /iOS/i.test(systemInfo.system);

/**
 * 判断平台是否为Android
 */
export const IS_ANDROID = /Android/i.test(systemInfo.system);

/**
 * 判断平台是否为Mac
 */
export const IS_MAC = /mac/i.test(systemInfo.system);

/**
 * 获取系统版本
 */
export const APP_VERSION = systemInfo.version;

/**
 * 判断设备是否为全面屏设备
 */
const safeArea = systemInfo.safeArea;
let isFullscreenDevie = false;
if (systemInfo.screenHeight > safeArea.bottom) {
  isFullscreenDevie = true;
}
export const IS_FULLSCREEN_DEVICE = isFullscreenDevie;
